package com.jxdinfo.hussar.activitidemo.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.jxdinfo.hussar.activitidemo.bean.AutoComplete;
import com.jxdinfo.hussar.activitidemo.bean.TdbYjMLinkman;
import com.jxdinfo.hussar.activitidemo.dao.TdbYjMLinkmanDao;

/**
 * <p>
 * 联系人模块服务实现类
 * </p>
 *
 * @author
 * @since 2019-03-22
 */
@Service
public class TdbYjMLinkmanServiceImpl extends ServiceImpl<TdbYjMLinkmanDao, TdbYjMLinkman>
		implements ITdbYjMLinkmanService {
	@Autowired
	TdbYjMLinkmanDao dao;

	@Override
	public int insertinfo(TdbYjMLinkman info) {
		return dao.insertInfo(info);
	}

	@Override
	public int deleteById(TdbYjMLinkman info) {
		return dao.deleteById(info);
	}

	@Override
	public int update(TdbYjMLinkman info) {
		return dao.update(info);
	}

	@Override
	public Page<Map<String, Object>> selectByCondition(Page<Map<String, Object>> page, Map<String, Object> info) {
		page.setRecords(this.dao.selectByCondition(page, info));
		String count = this.selectCountByCondition(info);
		page.setTotal(Integer.valueOf(count));
		return page;
	}

	@Override
	public int updateBatch(Map<String, Object> map) {
		return dao.updateBatch(map);
	}

	public String selectCountByCondition(Map<String, Object> map) {
		// TODO 自动生成的方法存根
		return dao.selectCountByCondition(map);
	}

	@Override
	public List<AutoComplete> selectApplyDept(Map<String, Object> map) {
		return dao.selectApplyDept(map);
	}

	@Override
	public List<Map<String, Object>> initSelectYjjb() {
		// TODO Auto-generated method stub
		return dao.initSelectYjjb();
	}

	@Override
	public int deleteBatchYjlxr(Map<String, Object> map) {
		// TODO Auto-generated method stub
		int d = dao.deleteBatchYjlxr(map);
		return d;
	}
	
	@Override
	public int updateBatchYjlxr(Map<String, Object> map) {
		// TODO Auto-generated method stub
		int u = dao.updateBatchYjlxr(map);
		return u;
	}
}
